hwo to decrypt the field in mrt?

Stimulsoft Reports.NET discussion
Post Reply
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

hwo to decrypt the field in mrt?

Post by fjaweihyafie »

Thans for every one , now I had the solution , we can add the dll assembly reference in mrt and code with C# , glad to share with you!

-------------------Origianl question---------------
I created datasource in mrt , now I select a "UserID" field from database , but the "UserID" has been encrypted before storing into the database by a method in dll including decryption and ecrypting method .

Now I need to decrypt it to show on the report page , when selected from database it is encrypted . Can I solve it just in "mrt" files ? Or please share you views .

Dose anyone can help me to give a solution .

Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: hwo to decrypt the field in mrt?

Post by Alex K. »

Hello,

Ok.
Let us know if you need any additional help.
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

Re: hwo to decrypt the field in mrt?

Post by fjaweihyafie »

Now I had now problems , I need to hide the form when it loaded in some reasons , so I had tried code " frm22TaxReport.Visible = IsShowParamForm; " ,"IsShowParamForm" is a Variable defined in my " mrt" file to control the visible property of the form. But I get the error -- "Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling showDialog." Could you help me ? Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: hwo to decrypt the field in mrt?

Post by Alex K. »

Hello,

Can you please clarify in which moment do you try to set this property?
Please send us a sample report which reproduces the issue for analysis.

Thank you.
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

Re: hwo to decrypt the field in mrt?

Post by fjaweihyafie »

Aleksey wrote:Hello,

Can you please clarify in which moment do you try to set this property?
Please send us a sample report which reproduces the issue for analysis.

Thank you.
Hi,here is a sample mrt file. There is a fomr window named "Form1" and a variable named "IsShowParamForm" ,when "True" the Form1 should show on the screen ,when "False" the Fomr1 should hide by the "IsShowParamForm" value . This is my target.I code "Form1.Visible = IsShowParamForm" in the "LoadForm" event of the Form1,when the "IsShowParamForm" set to "False" ,the error ocured .
Thanks for you help.

----Add---
when I code

Code: Select all

if(IsShowParamForm == false)
{
	frm22TaxReport.Visible = false;
}
it works correctly ,I doubt why code

Code: Select all

Form1.Visible = IsShowParamForm
is incorrect .
Attachments
MySampleReport.mrt
(3.33 KiB) Downloaded 501 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: hwo to decrypt the field in mrt?

Post by HighAley »

Hello.

Because the Form is already loading. You should get next error message:
Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling showDialog.
If you need do disable form, you should to it before showing report.

Thank you.
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

Re: hwo to decrypt the field in mrt?

Post by fjaweihyafie »

fjaweihyafie wrote:
Aleksey wrote:Hello,
when I code

Code: Select all

if(IsShowParamForm == false)
{
	frm22TaxReport.Visible = false;
}
it works correctly ,I doubt why code

Code: Select all

Form1.Visible = IsShowParamForm
is incorrect .
Should I code in "Begin Render" in the Reprot event ? I still doubt what I mentioned ,so I quoted it ,the to ways to set the form invisible , why the first is correct ,and another is got errors.
Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: hwo to decrypt the field in mrt?

Post by HighAley »

Hello.

This code in the Begin Render event will work right.
To give you an answer why the first code is right we need to know where do you use it and what is the frm22TaxReport?

Thank you.
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

Re: hwo to decrypt the field in mrt?

Post by fjaweihyafie »

Aleksey Andreyanov wrote:Hello.

This code in the Begin Render event will work right.
To give you an answer why the first code is right we need to know where do you use it and what is the frm22TaxReport?

Thank you.
all the code writed in the "load form" event and frm22TaxReport is the form name ,just as the code "Form1" as mentioned former
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: hwo to decrypt the field in mrt?

Post by HighAley »

Hello.

Did you try to use Begin Render event?

Thank you.
Post Reply