# Using NSolve function in NIntegrate

I am trying to evaluate a relatively complex numerical integral, which integrates over a function which is defined as a numerical solution of an equation. The integral is defined as:

tlab[\[Tau]_, a0_, u0_] := NIntegrate[u[XiTau[t, 0, a0, t0electron, u0], 0, a0, t0electron, u0][[1]] dTauXi[\[Xi] /. NXiTau[t, 0, a0, t0electron, u0],
0, a0, t0electron, u0], {t, 0, \[Tau]}];


Whereas u, dXiTau are well defined symbolic functions, and NXiTau is defined as:

NXiTau := NSolve[\[Tau] == TauXi[\[Xi], \[Xi]0, a0, \[Tau]0, u0x] && \[Xi] >=  0, \[Xi]];


(TauXi is also a simbolic expession). However, when trying to compute the integral for specific parameters, it throws the error message:

ReplaceAll::reps: {NSolve[t==[Xi]/Sqrt[1000001]-6.24*10^-7 (Times[<<2>>]+Times[<<2>>])&&[Xi]>=0,[Xi]]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

It seems like it's because mathematica is trying to evaluate the integrand as a symbolic expression, so that the NSolve function isn't computed. Any idea for a solution? Thanks!