Switching Views Programatically

J

jithendrianr

Hi All,

I am using Infoapth 2007 form. In that i have two different views
namely, Admin view and User view. My scenario is this. I am loading
that infoapth form from my client application(windows App) through
FormControl. I have wriitten a onload event on the Infopath form where
i am checking the incoming parameter and based on that i am displaying
the view.But when i try to load the infoapth form i am getting the
following ComException

"InfoPath cannot create a new, blank form.
InfoPath cannot open the form. To fix this problem, contact your
system administrator.

Form template: D:\CAB\InfoPath\MultipleViews.xsn?usr=admin
The following form template for the form cannot be found:
file:///D:\CAB\InfoPath\MultipleViews.xsn%3fusr=admin"

Then i changed the way i specify my file location from UNC style.
Still i get the COMException saying

"InfoPath cannot create a new, blank form.
InfoPath cannot open the form. To fix this problem, contact your
system administrator.

Form template: file://D:/CAB/InfoPath/MultipleViews.xsn?usr=admin
The following form template for the form cannot be found:
file:///D:\CAB\InfoPath\MultipleViews.xsn?usr=admin "

What am i missing here :( ?
The issue is urgent. Need help on this

TIA
Cheers
Jithendrian. R
 
J

jithendrianr

Hi,

Check out this link, may be helpful for you.

http://archive.infopathdev.com/forums/topic.asp?TOPIC_ID=2885&SearchT...

--
k.Ramana Reddyhttp://www.autonomysystems.com











- Show quoted text -

Hi Ramana,
Tahnks for the response. But then the link u specified was about
changing the views. But then i am stuck before that itself. I need to
pass the user type as parameter based on which i need to change the
view. If iam not passing paramter while loding the form through
"NewFromFormTemplate" i am able to load the form but only if i specify
an parameter it throws ComException
need help on this
TIA
Cheers
Jithendrian. R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top