| |

VerySource

 Forgot password?
 Register
Search
View: 1153|Reply: 10

I would like to ask you: how can you use VC ++ to dynamically give the value of the text box of the crystal report.

[Copy link]

1

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-27 12:40:01
| Show all posts |Read mode
I use VC ++ to call the crystal report, and I want to dynamically set the text box value of the crystal report according to the different choices of the user. How can I set it up?
Reply

Use magic Report

0

Threads

5

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-4-20 20:15:01
| Show all posts
You can try the database, you can connect the value of the text box you want to the database, so that you can dynamically write the value you want in the database, and use crystal reports to connect to this database, so that you can indirectly Realize your function, this is a way to try when you have no way.
Reply

Use magic Report

1

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-5-5 21:45:01
| Show all posts
Thank you heroes! I even found solutions for VB, DELPHI and C # on the Internet, but I couldn't find a solution for VC ++. Excuse me, please help me!
Reply

Use magic Report

0

Threads

22

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-6-6 15:15:02
| Show all posts
There are other ways, just convert it, just paste delphi, c#, everyone will transfer it
Reply

Use magic Report

1

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-6-21 21:30:01
| Show all posts
Okay, please help. Modify text
protected System.Web.UI.WebControls.Button btnChangeText;
  protected CrystalDecisions.Web.CrystalReportViewer cRV;
  myReport ReportDoc = new myReport();
  private void Page_Load(object sender, System.EventArgs e)
  {
   // Place user code here to initialize the page
   string strProvider = "Server=(local);DataBase=Northwind;UID=sa;PWD=111";
   SqlConnection MyConn = new SqlConnection(strProvider);
   MyConn.Open();
   string strSelOrders = "Select * from orders";
   string strSelOrdersDetails = "Select * from [Order Details]";
   SqlDataAdapter daOrder = new SqlDataAdapter(strSelOrders,MyConn);
   SqlDataAdapter daOrderDetails = new SqlDataAdapter(strSelOrdersDetails,MyConn);
   DataSet ds = new DataSet();
   daOrder.Fill(ds,"orders");
   daOrderDetails.Fill(ds,"Order Details");
   
   ReportDoc.SetDataSource(ds);
   cRV.ReportSource = ReportDoc;
  }
private void btnChangeText_Click(object sender, System.EventArgs e)
  {
   
   TextObject tb = (TextObject )ReportDoc.ReportDefinition.ReportObjects["Text2"];
   tb.Text = "Order Number";
  }

load
protected CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer1;
  protected System.Web.UI.WebControls.Button btnLoad;
  protected System.Web.UI.HtmlControls.HtmlInputFile File1;

  private void Page_Load(object sender, System.EventArgs e)
  {
   // Place user code here to initialize the page
   if(Session["filename"]!=null)
    CrystalReportViewer1.ReportSource = Session["filename"].ToString();

  }
private void btnLoad_Click(object sender, System.EventArgs e)
  {
   string strName = File1.PostedFile.FileName;
   if(strName.Trim()!="")
   {
    CrystalReportViewer1.ReportSource = strName;
    Session["filename"] = strName;
   }

  }
Reply

Use magic Report

1

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-7-28 07:00:01
| Show all posts
Which master can help!
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-29 13:15:01
| Show all posts
1. Get the handle of the text box
2. SetWindowText
Reply

Use magic Report

1

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-7-31 18:45:01
| Show all posts
How to get the handle of the text box?
Reply

Use magic Report

1

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-8-11 04:00:01
| Show all posts
Everyone ignored me? Which hero will help! I am so anxious to death!
Reply

Use magic Report

0

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-8-11 08:30:01
| Show all posts
How to get the handle of the text box?

=============================
CEdit* pBoxOne;
pBoxOne = (CEdit*) GetDlgItem(IDC_EDIT1);
GotoDlgCtrl(pBoxOne);

pBoxOne->setwindowtext()
?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list